package com.ruoyi.ruoyiserver.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.ruoyiserver.domain.PeObligeeInformtion;
import com.ruoyi.ruoyiserver.service.PersonInformationService;
import com.ruoyi.ruoyiserver.vo.PersonInformationVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/person/select")
@Api(tags = "查询全局信息")
public class PePersonInformationController extends BaseController{
    @Autowired
    private PersonInformationService personInformationService;
    @GetMapping("/list")
    @ApiOperation("查询全局信息接口")
    public TableDataInfo list(PersonInformationVo personInformationVo)
    {
        if (null == personInformationVo.getName() && null == personInformationVo.getIdNumber() && null == personInformationVo.getPhone()){
            return null;
        }
        startPage();
        List<PersonInformationVo> personList = personInformationService.getPersonList(personInformationVo);
        return getDataTable(personList);
    }
}
